<template>
  <a-config-provider
  :componentSize="'large'"
    :theme="{
      token: {
        colorPrimary: '#4fb65d',
      },
    }"
  >
    <router-view></router-view>
  </a-config-provider>
</template>

<script setup>
import { onMounted } from 'vue';

function screen() {
  const designDraftWidth = 1920; //设计稿的宽度

  const designDraftHeight = 1080; //设计稿的高度

  // console.log(
  //   "123",
  //   `scale(${document.documentElement.clientWidth / designDraftWidth},${
  //     document.documentElement.clientHeight / designDraftHeight
  //   })`
  // );
  // //缩放比例
  // document.body.style.transform = `scale(${
  //   document.documentElement.clientWidth / designDraftWidth
  // },${document.documentElement.clientHeight / designDraftHeight})`;
  document.body.style.transformOrigin = "top left";
  document.body.style.transition = "transform .5s";
  const scaleX = document.documentElement.clientWidth / designDraftWidth;
  const scaleY = document.documentElement.clientHeight / designDraftHeight;
  const scale = Math.min(scaleX, scaleY);
  const left = (document.documentElement.clientWidth - designDraftWidth * scale) / 2;
  const top = (document.documentElement.clientHeight - designDraftHeight * scale) / 2;
  document.body.style.transform = `translate(${left}px, ${top}px) scale(${scale})`;
}
screen();
window.onresize = () => {
  screen();
};

onMounted(() => {
  screen();
});
</script>

<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  background: #f6f6f6;
}

div {
  box-sizing: border-box;
}

nav {
  padding: 30px;

  a {
    font-weight: bold;
    color: #2c3e50;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
}
.left-menu {
  width: 108px;
  height: 100%;
  background-color: #303a58;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 70px 30px 30px 70px;
  float: left;
}
.img-responsive {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}
.menu {
  width: 70px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  border-radius: 44px 44px 44px 44px;
  cursor: pointer;
  overflow: hidden;
  text-align: center;
}
.img-box {
  padding: 25px 15px 10px 15px;
  img {
    margin-top: 0px;
  }
}
.icon {
  width: 34px;
  height: 34px;
}
.txt {
  width: 100%;
  height: 28px;
  line-height: 28px;
  text-align: center;
  color: #fff;
  margin-top: 5px;
}
.box {
  float: right;
  width: calc(100% - 108px);
  height: calc(100% - 0px);
}
.head {
  width: calc(100% - 0px);
  height: 68px;
  background: #fff;
  padding: 7px;
  box-shadow: 0px 1px 40px 1px rgba(21, 34, 50, 0.08);

  .logos {
    width: 50px;
    height: 50px;
    float: left;
    margin-right: 8px;
  }
  .title {
    min-width: 20px;
    height: 68px;
    float: left;
    color: #040415;
    font-size: 23px;
    line-height: 54px;
    text-align: left;
    font-weight: bold;
  }
  span {
    min-width: 20px;
    height: 68px;
    float: left;
    color: #5a607f;
    line-height: 56px;
    font-size: 14px;
    font-weight: bold;
    margin-left: 8px;
  }
  .order {
    width: 130px !important;
    border-radius: 30px;
    cursor: pointer;
    text-align: center !important;
    height: 54px !important;
    padding: 0;
    float: right;
    background: #6ab269;
    color: #fff !important;
    line-height: 56px;
    font-size: 20px;
    font-weight: bold;
    margin-left: 8px;
  }
}
.main {
  width: calc(100% - 0px);
  height: calc(100% - 68px);
  padding: 25px 0 0 25px;
  // padding: 25px 25px 0 25px;
  // padding: 25px 25px 25px 25px;
  // background: blue
}
</style>
